﻿using System;
using System.Collections.Generic;
using Infrastructure.Domain;

namespace SocialFront.Core.Domain
{
    public class Location : EntityBase
    {
        public string LocationCode { get; set; }
        public virtual IList<Foo> Foos { get; set; }
    }

    public class Foo : EntityBase 
    {
        public string Foo1 { get; set; }
        public string Foo2 { get; set; }

        public Foo()
        {
            // All complex types must be initialized - can never be null.
            FooDetailComplex = new FooDetailComplex();
        }

        public virtual FooDetail FooDetail { get; set; }
        public FooDetailComplex FooDetailComplex { get; set; }

        public virtual IList<FooSibling> Siblings { get; set; }
        public virtual IList<Location> Locations { get; set; }
    }

    public class FooSibling : EntityBase 
    {
        public string SiblingPropFoo { get; set; }
        public string SiblingPropFoo2 { get; set; }

        public long FooId { get; set; }
        public virtual Foo Foo { get; set; }

        public virtual IList<FooSiblingSibling> Siblings { get; set; }
    }

    public class FooSiblingSibling : EntityBase 
    {
        public string SiblingSiblingPropFoo { get; set; }
        public string SiblingSiblingPropFoo2 { get; set; }

        public long ? FooSiblingId { get; set; }
        public virtual FooSibling FooSibling { get; set; }
    }

    public class FooDetail : EntityBase
    {
        public string FooDetailProp { get; set; }
        public string FooDetailProp2 { get; set; }

        public virtual IList<FooDetailSibling> Siblings { get; set; }
    }

    public class FooDetailSibling : EntityBase
    {
        public string FooDetailSiblingProp { get; set; }

        public long FooDetailId { get; set; }
        public virtual FooDetail FooDetail { get; set; }
    }

    public class FooDetailComplex  
    {
        public string FooDetailComplexProp { get; set; }
        public string FooDetailComplexProp2 { get; set; }
    }
}
